/**
 * Created by benben on 14-9-18.
 */
var express = require('express');
var router = express.Router();
var AreaService = require('../../service/system/AreaService');

var service = new AreaService();

router.route('/provinces').get(function(req, res) {
    service.findProvinces(function(page){
        res.json(page);
    });
});

router.route('/cities').get(function(req, res) {
    service.findCities(req.query.provinceNo,function(page){
        res.json(page);
    });
});

module.exports = router;